package com.example.zhugenew.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.mymvplibrary.adapter.BaseAdapter;
import com.example.mymvplibrary.adapter.BaseViewHolder;
import com.example.zhugenew.R;
import com.example.zhugenew.bean.HotTopicBean;

import java.util.List;

public class HotTopicAdapter extends BaseAdapter <List<HotTopicBean.ListBean>> {

    public HotTopicAdapter(List<List<HotTopicBean.ListBean>> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    public void bindData(BaseViewHolder holder, List<HotTopicBean.ListBean> listBeans, int pos) {
        ImageView hotitemimage1 = holder.getView(R.id.hotitem_image1);
        ImageView hotitemimage2 = holder.getView(R.id.hotitem_image2);
        ImageView hotitemimage3 = holder.getView(R.id.hotitem_image3);
        ImageView hotitemimage4 = holder.getView(R.id.hotitem_image4);
        Glide.with(context).load(listBeans.get(0).getThumb()).into(hotitemimage1);
        Glide.with(context).load(listBeans.get(1).getThumb()).into(hotitemimage2);
        Glide.with(context).load(listBeans.get(2).getThumb()).into(hotitemimage3);
        Glide.with(context).load(listBeans.get(3).getThumb()).into(hotitemimage4);
    }


}
 